import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';
import { prismjsPlugin } from 'vite-plugin-prismjs';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(
    {
      template: {
        compilerOptions: {
          // 将所有带短横线的标签名都视为自定义元素
          isCustomElement: (tag) => tag.includes('ion-')
        }
      }
    }
  ),
  prismjsPlugin({
    languages: 'all',
    plugins: ['line-numbers', 'copy-to-clipboard'], //官网有其他功能,这里开启行数和复制按钮功能  'line-numbers', 
    theme: 'okaidia',
    css: true,
  }),],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  }
})
